package main

import (
	"encoding/json"
	"fmt"
)

/*
type Movie struct {
	Title    string
	Year     int
	Color    bool
	Actors   []string
	duration int
}
*/

type Movie struct {
	Title    string   `json:"title"`
	Year     int      `json:"release"`
	Color    bool     `json:"color"`
	Actors   []string `json:"actors"`
	duration int      `json:"duration"`
}

func main() {
	m := Movie{
		Title: "Casablanca",
		Year:  1942,
		Color: false,
		Actors: []string{
			"Humphrey Bogart",
			"Ingrid Bergman",
		},
		duration: 1000,
	}

	// b, err := json.Marshal(m)
	b, err := json.MarshalIndent(m, "", "    ")
	if err != nil {
		fmt.Printf("%v\n", err)
		return
	}
	fmt.Printf("%s\n", b)
}
